/*! \file ShaderBuilder.h
 *	\brief <write description for ShaderBuilder.h>
 *
 *	created:	2010/04/25
 *	created:	25:4:2010   15:39
 *	filename: 	c:\Users\venn\Documents\tactics-engine\libs\gd_dx11\ShaderBuilder.h
 *	file path:	c:\Users\venn\Documents\tactics-engine\libs\gd_dx11
 *	file base:	ShaderBuilder
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _gd_dx11_SHADERBUILDER_H_
#define _gd_dx11_SHADERBUILDER_H_

#pragma once

#include <gd/ShaderBuilder.h>
#include <io/BaseIStream.h>
#include <utils/COMPointer.h>

namespace tt{
namespace gd_dx11{

class Device;

class ShaderBuilder : public gd::ShaderBuilder
{
public:
	ShaderBuilder(Device*);
	virtual ~ShaderBuilder();

protected:
	virtual SharedPtr<gd::PixelShader> onCreatePixelShader(const utils::PTree& desc);
	virtual SharedPtr<gd::VertexShader> onCreateVertexShader(const utils::PTree& desc);

private:
	Bool CompileShaderFromFile( io::BaseIStream& is, String entryPoint, String shaderModel, utils::COMPointer<ID3D10Blob>& blobOut );

private:
	Device* m_device;
};

} //namespace gd_dx11
} //namespace tt

#endif //_gd_dx11_SHADERBUILDER_H_